startActivityFromFragment

open fun startActivityFromFragment(@NonNull fragment: Fragment, @NonNull intent: Intent, requestCode: Int)(source)

Called by Fragment.startActivityForResult() to implement its behavior.

Parameters

fragment

the Fragment to start the activity from.

intent

The intent to start.

requestCode

The request code to be returned in onActivityResult when the activity exits. Must be between 0 and 65535 to be considered valid. If given requestCode is greater than 65535, an IllegalArgumentException would be thrown.


open fun startActivityFromFragment(@NonNull fragment: Fragment, @NonNull intent: Intent, requestCode: Int, @Nullable options: Bundle)(source)

Called by Fragment.startActivityForResult() to implement its behavior.

Parameters

fragment

the Fragment to start the activity from.

intent

The intent to start.

requestCode

The request code to be returned in onActivityResult when the activity exits. Must be between 0 and 65535 to be considered valid. If given requestCode is greater than 65535, an IllegalArgumentException would be thrown.

options

Additional options for how the Activity should be started. See startActivity for more details. This value may be null.